package com.jason.account.service;

import com.jason.account.dao.TccAccountMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class AccountService {
    @Resource
    TccAccountMapper tccAccountMapper;

    @Transactional(rollbackFor = Exception.class)
    public boolean addMoney(Integer accountId, Integer amount) {
        tccAccountMapper.updateAmountById(amount,accountId);
        return true;
    }

}
